local extension = Package:new("lvshi_cards", Package.CardPack)
extension.extensionName = "lvshi"
--extension.game_modes_whitelist = {"m_3v3_mode"}
--extension.game_modes_blacklist = {"m_1v1_mode"}

extension:loadSkillSkelsByPath("./packages/lvshi/pkg/lvshi_cards/skills")

if not Fk.skills["#ShownCards"] then
  local showncard = require "packages/lvshi/pkg/lvshi_cards/special_skills/showncard"
  extension:loadSkillSkels {showncard}
end

if not Fk.skills["#set_strategy"] then
  local strategy = require "packages/lvshi/pkg/lvshi_cards/special_skills/strategy"
  extension:loadSkillSkels {strategy}
end

if not Fk.skills["#lvshi__shield"] then
  local shield = require "packages/lvshi/pkg/lvshi_cards/special_skills/shield"
  extension:loadSkillSkels {shield}
end

fk.BrightDamage = 66

Fk:addDamageNature(fk.BrightDamage, "bright_damage")

Fk:loadTranslationTable{
  ["lvshi_cards"] = "氯师杀卡牌",
  ["bright_damage"] = "光属性",
}

extension:addCardSpec("lvshi__slash", Card.Spade, 4)
extension:addCardSpec("lvshi__slash", Card.Spade, 8)
extension:addCardSpec("lvshi__slash", Card.Spade, 10)
extension:addCardSpec("lvshi__slash", Card.Spade, 12)
extension:addCardSpec("lvshi__slash", Card.Heart, 11)
extension:addCardSpec("lvshi__slash", Card.Heart, 13)
extension:addCardSpec("lvshi__slash", Card.Club, 4)
extension:addCardSpec("lvshi__slash", Card.Club, 6)
extension:addCardSpec("lvshi__slash", Card.Club, 8)
extension:addCardSpec("lvshi__slash", Card.Club, 10)
extension:addCardSpec("lvshi__slash", Card.Club, 10)
extension:addCardSpec("lvshi__slash", Card.Club, 12)
extension:addCardSpec("lvshi__slash", Card.Diamond, 13)

extension:addCardSpec("lvs_thunder__slash", Card.Spade, 5)
extension:addCardSpec("lvs_thunder__slash", Card.Spade, 9)
--extension:addCardSpec("lvs_thunder__slash", Card.Spade, 10)
extension:addCardSpec("lvs_thunder__slash", Card.Club, 5)
extension:addCardSpec("lvs_thunder__slash", Card.Club, 9)

extension:addCardSpec("lvs_fire__slash", Card.Heart, 7)
extension:addCardSpec("lvs_fire__slash", Card.Diamond, 4)
extension:addCardSpec("lvs_fire__slash", Card.Diamond, 6)
extension:addCardSpec("lvs_fire__slash", Card.Diamond, 12)

extension:addCardSpec("bright__slash", Card.Club, 8)
extension:addCardSpec("bright__slash", Card.Diamond, 5)

extension:addCardSpec("lvshi__jink", Card.Diamond, 2)
extension:addCardSpec("lvshi__jink", Card.Heart, 5)
extension:addCardSpec("lvshi__jink", Card.Heart, 7)
extension:addCardSpec("lvshi__jink", Card.Heart, 10)
extension:addCardSpec("lvshi__jink", Card.Diamond, 2)
extension:addCardSpec("lvshi__jink", Card.Diamond, 7)
extension:addCardSpec("lvshi__jink", Card.Diamond, 7)
extension:addCardSpec("lvshi__jink", Card.Diamond, 8)
extension:addCardSpec("lvshi__jink", Card.Diamond, 8)
extension:addCardSpec("lvshi__jink", Card.Diamond, 9)
extension:addCardSpec("lvshi__jink", Card.Diamond, 10)
extension:addCardSpec("lvshi__jink", Card.Diamond, 11)
extension:addCardSpec("lvshi__jink", Card.Diamond, 11)

extension:addCardSpec("lvshi__peach", Card.Heart, 4)
extension:addCardSpec("lvshi__peach", Card.Heart, 6)
extension:addCardSpec("lvshi__peach", Card.Heart, 8)
extension:addCardSpec("lvshi__peach", Card.Heart, 9)
extension:addCardSpec("lvshi__peach", Card.Heart, 10)
extension:addCardSpec("lvshi__peach", Card.Diamond, 2)
extension:addCardSpec("lvshi__peach", Card.Diamond, 6)
extension:addCardSpec("lvshi__peach", Card.Diamond, 10)

extension:addCardSpec("lvshi__analeptic", Card.Spade, 9)
extension:addCardSpec("lvshi__analeptic", Card.Club, 9)
extension:addCardSpec("lvshi__analeptic", Card.Diamond, 9)

local slash = fk.CreateCard{
  name = "lvshi__slash",
  type = Card.TypeBasic,
  skill = Fk.skills["slash_skill"],
  is_damage_card = true,
}

local thunder__slash = fk.CreateCard{
  name = "lvs_thunder__slash",
  type = Card.TypeBasic,
  --skill = Fk.skills["thunder__slash_skill"],
  skill = "lvs_thunder__slash_skill",
  is_damage_card = true,
}

local fire__slash = fk.CreateCard{
  name = "lvs_fire__slash",
  type = Card.TypeBasic,
  skill = Fk.skills["fire__slash_skill"],
  is_damage_card = true,
}

local bright__slash = fk.CreateCard{
  name = "bright__slash",
  type = Card.TypeBasic,
  skill = "bright__slash_skill",
  is_damage_card = true,
}

Fk:loadTranslationTable{
  ["lvshi__slash"] = "杀",
  [":lvshi__slash"] = Fk:translate(":slash"),
  ["lvs_fire__slash"] = "火杀",
  [":lvs_fire__slash"] = "基本牌<br/>"..
  "<b>时机</b>：出牌阶段<br/>"..
  "<b>目标</b>：攻击范围内的一名角色<br/>"..
  "<b>效果</b>：对目标角色造成1点火焰伤害。<br/>"..
  "<b>特殊效果</b>：火【杀】造成伤害无视护甲。",

  ["lvs_thunder__slash"] = "雷杀",
  [":lvs_thunder__slash"] = "基本牌<br/>"..
  "<b>时机</b>：出牌阶段<br/>"..
  "<b>目标</b>：一名其他角色<br/>"..
  "<b>效果</b>：对目标角色造成1点雷电伤害。<br/>"..
  "<b>特殊效果</b>：雷【杀】无距离限制。",
  ["#lvs_thunder__slash_skill"] = "选择一名角色，对其造成1点雷电伤害",
  ["#lvs_thunder__slash_skill_multi"] = "选择至多%arg名角色，对这些角色各造成1点雷电伤害",

  ["bright__slash"] = "光杀",
  [":bright__slash"] = "基本牌<br/>"..
  "<b>时机</b>：出牌阶段<br/>"..
  "<b>目标</b>：攻击范围内的一名角色<br/>"..
  "<b>效果</b>：对目标角色造成1点光照伤害。<br/>"..
  "（一名角色造成不为连环伤害的光照伤害后，来源可选择其至多两张手牌，将其中的暗置牌明置，明置牌弃置）。",

  ["bright__slash_skill"] = "光杀",
  ["#bright__slash_skill"] = "选择攻击范围内的一名角色，对其造成1点光照伤害",
  ["#bright__slash_skill_multi"] = "选择攻击范围内的至多%arg名角色，对这些角色各造成1点光照伤害",
}

local jink = fk.CreateCard{
  type = Card.TypeBasic,
  name = "lvshi__jink",
  skill = Fk.skills["jink_skill"],
  is_passive = true,
}

local peach = fk.CreateCard{
  name = "lvshi__peach",
  type = Card.TypeBasic,
  skill = Fk.skills["peach_skill"],
}

local analeptic = fk.CreateCard{
  name = "lvshi__analeptic",
  type = Card.TypeBasic,
  skill = Fk.skills["analeptic_skill"],
}

Fk:loadTranslationTable{
  ["lvshi__jink"] = "闪",
  [":lvshi__jink"] = Fk:translate(":jink"),
  ["lvshi__peach"] = "桃",
  [":lvshi__peach"] = Fk:translate(":peach"),
  ["lvshi__analeptic"] = "酒",
  [":lvshi__analeptic"] = Fk:translate(":analeptic"),
}

local pear = fk.CreateCard{
  name = "pear",
  type = Card.TypeBasic,
  skill = "pear_skill",
}

local poison = fk.CreateCard{
  name = "lvshi_poison",
  type = Card.TypeBasic,
  skill = "lvshi_poison_skill",
}

extension:addCardSpec("pear", Card.Heart, 3)
extension:addCardSpec("pear", Card.Diamond, 3)

extension:addCardSpec("lvshi_poison", Card.Spade, 3)
extension:addCardSpec("lvshi_poison", Card.Club, 3)

Fk:loadTranslationTable{
  ["pear"] = "梨",
  [":pear"] = "<b>基本牌</b></font><br/><b>时机：</b>出牌阶段。<br/>"..
  "<b>目标：</b>一名已受伤的其他角色。<br/><b>效果：</b>目标角色回复1点体力。<br/>"..
  "<b>固有效果</b>：锁定技，当【梨】离开你的手牌区后，若不为你的出牌阶段，你回复1点体力。",
  ["pear_skill"] = "梨",
  ["#pear_skill"] = "选择一名其他角色，其回复1点体力"..
  "<br /><font color=\"#C1E1C1\"><b>你于出牌阶段外失去此牌后回复1点体力</b></font>",
  ["#pear_skill_multi"] = "选择至多%arg名其他角色，这些角色各回复1点体力",

  ["lvshi_poison"] = "毒",
  [":lvshi_poison"] = "<b>基本牌</b><br /><b>时机</b>：出牌阶段（每回合限一次）<br /><b>目标</b>：距离为1的一名其他角色<br /><b>效果</b>：目标角色失去1点体力。<br /><b>固有效果</b>：锁定技，当此牌置入弃牌堆后，当前回合角色失去1点体力。",
  ["lvshi_poison_skill"] = "毒",
  ["#lvshi_poison_skill"] = "选择一名距离为1的角色，其失去1点体力"..
  "<br /><font color=\"#F0E68C\"><b>此牌进入弃牌堆后当前回合角色失去1点体力！</b></font>",
  ["#lvshi_poison_skill_multi"] = "选择至多%arg名距离为1的角色，这些角色各失去1点体力",
}

local scroll = fk.CreateCard{
  name = "scroll",
  type = Card.TypeBasic,
  skill = "scroll_skill",
}

extension:addCardSpec("scroll", Card.Spade, 10)
extension:addCardSpec("scroll", Card.Heart, 9)

Fk:loadTranslationTable{
  ["scroll"] = "卷",
  [":scroll"] = "<b>基本牌</b></font><br/><b>时机：</b>出牌阶段限一次。<br/>"..
  "<b>目标：</b>你。<br/><b>效果：</b>目标角色<a href=':lvshi_discover'>发现</a>一张基本牌。",
  ["scroll_skill"] = "卷",
  ["#scroll_skill"] = "你发现一张基本牌（同炉石的发现机制）",
  [':lvshi_discover'] = "你从三张不同名称的卡牌中选择一张获得之",
}

local dismantlement = fk.CreateCard{
  name = "lvshi__dismantlement",
  type = Card.TypeTrick,
  skill = "lvshi__dismantlement_skill",
}

extension:addCardSpec("lvshi__dismantlement", Card.Spade, 4)
extension:addCardSpec("lvshi__dismantlement", Card.Spade, 7)
extension:addCardSpec("lvshi__dismantlement", Card.Heart, 4)
extension:addCardSpec("lvshi__dismantlement", Card.Club, 4)

local snatch = fk.CreateCard{
  name = "lvshi__snatch",
  type = Card.TypeTrick,
  skill = "lvshi__snatch_skill",
}

extension:addCardSpec("lvshi__snatch", Card.Spade, 6)
extension:addCardSpec("lvshi__snatch", Card.Club, 12)
extension:addCardSpec("lvshi__snatch", Card.Diamond, 4)

Fk:loadTranslationTable{
  ["lvshi__dismantlement"] = "过河拆桥",
  [":lvshi__dismantlement"] = "<b>锦囊牌</b><br /><b>时机</b>：出牌阶段<br /><b>目标</b>：一名区域里有牌的其他角色。<br /><b>效果</b>：你弃置目标角色区域里的一张牌。"..
  "<br /><b>智策略效果</b>：你先观看目标角色的手牌。<br /><b>勇策略效果</b>：若你与目标角色距离为1且弃置的牌与此牌颜色相同，你获得之。",
  ["dismantlement_scheme"] = "智策略",
  [":dismantlement_scheme"] = "你先观看目标角色的手牌",
  ["dismantlement_courage"] = "勇策略",
  [":dismantlement_courage"] = "若你与目标角色距离为1且弃置的牌与此牌颜色相同，你获得之",
  ["#lvshi__dismantlement_skill"] = "你弃置目标角色区域里的一张牌",

  ["lvshi__snatch"] = "顺手牵羊",
  [":lvshi__snatch"] = "<b>锦囊牌</b><br /><b>时机</b>：出牌阶段<br /><b>目标</b>：距离为1的一名区域里有牌的其他角色。<br /><b>效果</b>：你获得目标角色区域里的一张牌。"..
  "<br /><b>智策略效果</b>：你先观看目标角色的手牌，若你获得【闪】或【桃】，你明置之，其摸两张牌。<br /><b>勇策略效果</b>：目标角色明置所有【杀】，若你获得【杀】或【毒】，你翻面，视为对目标角色使用之。",
  ["snatch_scheme"] = "智策略",
  [":snatch_scheme"] = "你先观看目标角色的手牌，若你获得【闪】或【桃】，其摸两张牌",
  ["snatch_courage"] = "勇策略",
  [":snatch_courage"] = "目标角色明置所有【杀】，若你获得【杀】或【毒】，你翻面，视为对目标角色使用之",
  ["#lvshi__snatch_skill"] = "你获得距离1的角色区域里的一张牌",
}

extension:addCardSpec("lvshi__duel", Card.Spade, 1)
extension:addCardSpec("lvshi__duel", Card.Diamond, 1)

local duel = fk.CreateCard{
  name = "lvshi__duel",
  type = Card.TypeTrick,
  skill = "lvshi__duel_skill",
  is_damage_card = true,
}

Fk:loadTranslationTable{
  ["lvshi__duel"] = "决斗",
  [":lvshi__duel"] = "<b>锦囊牌</b><br /><b>时机</b>：出牌阶段<br /><b>目标</b>：一名其他角色<br /><b>效果</b>：由目标角色开始，其与你轮流打出【杀】，直到其中一名角色未打出【杀】。然后未打出【杀】的角色受到另一名角色对其造成的1点伤害。"..
  "<br /><b>智策略效果</b>：打出【杀】改为打出锦囊牌。<br /><b>勇策略效果</b>：若你的体力值为场上最小，则此牌造成的伤害+1。",
  ["duel_scheme"] = "智策略",
  [":duel_scheme"] = "打出【杀】改为打出锦囊牌",
  ["duel_courage"] = "勇策略",
  [":duel_courage"] = "若你的体力值为场上最小，则此牌造成的伤害+1",
  ["#lvshi__duel_skill"] = Fk:translate("#duel_skill"),
  [".|.|.|.|.|trick"] = "锦囊牌",
}

local fireattack = fk.CreateCard{
  name = "lvshi__fire_attack",
  type = Card.TypeTrick,
  skill = "lvshi__fire_attack_skill",
  is_damage_card = true,
}

extension:addCardSpec("lvshi__fire_attack", Card.Heart, 2)
extension:addCardSpec("lvshi__fire_attack", Card.Diamond, 3)

Fk:loadTranslationTable{
  ["lvshi__fire_attack"] = "火攻",
  [":lvshi__fire_attack"] = "<b>锦囊牌</b><br /><b>时机</b>：出牌阶段<br /><b>目标</b>：一名有手牌的角色<br /><b>效果</b>：目标角色明置一张手牌，然后你可弃置一张与其明置手牌花色相同的牌，对其造成1点火焰伤害。"..
  "<br /><b>智策略效果</b>：目标角色明置所有手牌。<br /><b>勇策略效果</b>：若你未弃置牌，目标交给你一张明置牌。",
  ["#lvshi__fire_attack-throw"] = "你可以弃置一张与%src明置牌花色相同的牌，对其造成1点火焰伤害",
  ["fire_attack_scheme"] = "智策略",
  [":fire_attack_scheme"] = "目标角色明置所有手牌",
  ["fire_attack_courage"] = "勇策略",
  [":fire_attack_courage"] = "若你未弃置牌，目标交给你一张明置牌",
  ["#lvshi__fire_attack-give"] = "请交给%src一张明置牌",
  ["#lvshi__fire_attack_skill"] = Fk:translate("#fire_attack_skill"),
}

local drowning = fk.CreateCard{
  name = "lvshi__drowning",
  type = Card.TypeTrick,
  skill = "lvshi__drowning_skill",
  is_damage_card = true,
}

extension:addCardSpec("lvshi__drowning", Card.Club, 7)

Fk:loadTranslationTable{
  ["lvshi__drowning"] = "水淹七军",
  ["lvshi__drowning_skill"] = "水淹七军",
  [":lvshi__drowning"] = "<b>锦囊牌</b><br /><b>时机</b>：出牌阶段<br /><b>目标</b>：一名其他角色<br /><b>效果</b>：目标角色选择一项：弃置装备区内的所有牌（至少一张），或受到你造成的1点伤害。"..
  "<br /><b>智策略效果</b>：改为造成冰冻伤害。<br /><b>勇策略效果</b>：你额外弃置一张锦囊牌，令目标角色两项均执行。",
  ["drowning_scheme"] = "智策略",
  [":drowning_scheme"] = "改为造成冰冻伤害",
  ["drowning_courage"] = "勇策略",
  [":drowning_courage"] = "你额外弃置一张锦囊牌，令目标角色两项均执行。",
  ["#lvshi__drowning_skill"] = "目标角色弃置装备区内的所有牌，否则受到1点伤害",
  ["#drowning-discard"] = "请弃置装备区内的所有牌，否则%dest对你造成1点伤害",
}

local ex_nihilo = fk.CreateCard{
  name = "lvshi__ex_nihilo",
  type = Card.TypeTrick,
  skill = "lvshi__ex_nihilo_skill",
}

extension:addCardSpec("lvshi__ex_nihilo", Card.Heart, 3)
extension:addCardSpec("lvshi__ex_nihilo", Card.Heart, 11)

Fk:loadTranslationTable{
  ["lvshi__ex_nihilo"] = "无中生有",
  [":lvshi__ex_nihilo"] = "<b>锦囊牌</b><br /><b>时机</b>：出牌阶段<br /><b>目标</b>：包括你在内的一名角色。<br /><b>效果</b>：目标角色摸两张牌。"..
  "<br /><b>智策略效果</b>：你先卜算2。<br /><b>勇策略效果</b>：你额外摸一张牌，然后选择弃置一张非基本牌或两张牌。",
  ["ex_nihilo_scheme"] = "智策略",
  [":ex_nihilo_scheme"] = "你先卜算2",
  ["ex_nihilo_courage"] = "勇策略",
  [":ex_nihilo_courage"] = "你额外摸一张牌，然后选择弃置一张非基本牌或两张牌",
  ["#addtroops_throw"] = "请选择一张非基本牌弃置，否则你须弃置两张牌",
  ["lvshi__ex_nihilo_skill"] = "无中生有",
  ["#lvshi__ex_nihilo_skill"] = "你摸两张牌",
}

local rockfall = fk.CreateCard{
  name = "lvshi__rockfall",
  type = Card.TypeTrick,
  skill = "lvshi__rockfall_skill",
}

extension:addCardSpec("lvshi__rockfall", Card.Spade, 11)
extension:addCardSpec("lvshi__rockfall", Card.Club, 11)

Fk:loadTranslationTable{
  ["rockfall"] = "落井下石",
  ["lvshi__rockfall"] = "落井下石",
  ["lvshi__rockfall_skill"] = "落井下石",
  [":lvshi__rockfall"] = "<b>锦囊牌</b><br /><b>时机</b>：出牌阶段<br /><b>目标</b>：一名武将牌横置或没有手牌的角色<br /><b>效果</b>：目标角色失去1点体力。"..
  "<br /><b>智策略效果</b>：若目标角色未横置，其横置，否则其弃置一张手牌。<br /><b>勇策略效果</b>：若目标两项均满足，你可弃置一张黑色牌令其额外失去1点体力。",
  ["#lvshi__rockfall_skill"] = "令一名武将牌横置或没有手牌的角色失去1点体力",
  ["rockfall_scheme"] = "智策略",
  [":rockfall_scheme"] = "若目标角色未横置，其横置，否则其弃置一张手牌",
  ["rockfall_courage"] = "勇策略",
  [":rockfall_courage"] = "若目标两项均满足，你可弃置一张黑色牌令其额外失去1点体力",
}

local support = fk.CreateCard{
  name = "lvshi__support",
  type = Card.TypeTrick,
  skill = "lvshi__support_skill",
}

extension:addCardSpec("lvshi__support", Card.Club, 1)

Fk:loadTranslationTable{
  ["support"] = "援护",
  ["lvshi__support"] = "援护",
  ["lvshi__support_skill"] = "援护",
  [":lvshi__support"] = "普通锦囊牌<br /><b>时机</b>：出牌阶段<br /><b>目标</b>：一名角色<br /><b>效果</b>：目标角色将牌堆顶牌置为<a href='lvs__shield'>护甲</a>，然后若其手牌数为场上最小，其摸一张牌。"..
  "<br /><b>智策略效果</b>：摸牌无手牌数限制。<br /><b>勇策略效果</b>：若其体力值为场上最小，其回复1点体力。",
  ["#lvshi__support_skill"] = "目标角色获得1点护甲，手牌数最小则摸一张牌",
  ["support_scheme"] = "智策略",
  [":support_scheme"] = "摸牌无手牌数限制",
  ["support_courage"] = "勇策略",
  [":support_courage"] = "若其体力值为场上最小，其回复1点体力",
}

local nullification = fk.CreateCard{
  name = "lvshi__nullification",
  type = Card.TypeTrick,
  skill = Fk.skills["nullification_skill"],
  is_passive = true,
}

extension:addCardSpec("lvshi__nullification", Card.Spade, 13)
extension:addCardSpec("lvshi__nullification", Card.Heart, 13)
extension:addCardSpec("lvshi__nullification", Card.Club, 13)
extension:addCardSpec("lvshi__nullification", Card.Diamond, 13)

Fk:loadTranslationTable{
  ["lvshi__nullification"] = "无懈可击",
  ["lvshi__nullification_skill"] = "无懈可击",
  [":lvshi__nullification"] = Fk:translate(":nullification"),
}

local iron_chain = fk.CreateCard{
  name = "lvshi__iron_chain",
  type = Card.TypeTrick,
  skill = Fk.skills["iron_chain_skill"],
  special_skills = { "recast" },
  multiple_targets = true,
}

extension:addCardSpec("lvshi__iron_chain", Card.Spade, 3)
extension:addCardSpec("lvshi__iron_chain", Card.Club, 3)
extension:addCardSpec("lvshi__iron_chain", Card.Club, 13)

Fk:loadTranslationTable{
  ["lvshi__iron_chain"] = "铁索连环",
  [":lvshi__iron_chain"] = Fk:translate(":iron_chain")
}

local lure_tiger = fk.CreateCard{
  name = "lvshi__lure_tiger",
  type = Card.TypeTrick,
  skill = "lvshi__lure_tiger_skill",
  special_skills = { "recast" },
  multiple_targets = true,
}

extension:addCardSpec("lvshi__lure_tiger", Card.Spade, 13)

Fk:loadTranslationTable{
  ["lure_tiger"] = "调虎离山",
  ["lvshi__lure_tiger"] = "调虎离山",
  [":lvshi__lure_tiger"] = "锦囊牌<br/><b>时机</b>：出牌阶段<br/><b>目标</b>：一至两名其他角色<br/><b>效果</b>：目标角色于此回合内<a href='lvs__leave'>调离</a>。",
  ["#lvshi__lure_tiger_prohibit"] = "调虎离山",
  ["#lvshi__lure_tiger_skill"] = "选择一至两名其他角色，这些角色于此回合内调离",
  ["lvs__leave"] = "调离的角色不计入距离和座次的计算，且不能使用牌，不是牌的合法目标，体力值不会改变。",
  ["@@lure_tiger-turn"] = "调离",
}

local collaborate = fk.CreateCard{
  name = "lvshi__collaborate",
  type = Card.TypeTrick,
  skill = "lvshi__collaborate_skill",
  multiple_targets = true,
}

extension:addCardSpec("lvshi__collaborate", Card.Heart, 12)

Fk:loadTranslationTable{
  ["collaborate"] = "里应外合",
  ["lvshi__collaborate"] = "里应外合",
  [":lvshi__collaborate"] = "<b>锦囊牌</b><br /><b>时机</b>：出牌阶段<br /><b>目标</b>：一至两名有手牌的角色。<br /><b>效果</b>：你明置或暗置目标角色的一张手牌，最后若所有角色的明置手牌颜色相同且总数不小于两张，你摸两张牌。",
  ["lvshi__collaborate_skill"] = "里应外合",
  ["#lvshi__collaborate_skill"] = "你明置或暗置一至两名角色的一张手牌",
}

local savage_assault = fk.CreateCard{
  name = "lvs__savage_assault",
  type = Card.TypeTrick,
  skill = Fk.skills["savage_assault_skill"],
  is_damage_card = true,
  multiple_targets = true,
}

extension:addCardSpec("lvs__savage_assault", Card.Spade, 7)
extension:addCardSpec("lvs__savage_assault", Card.Club, 8)--考虑增加一张光属性AOE

local archery_attack = fk.CreateCard{
  name = "lvs__archery_attack",
  type = Card.TypeTrick,
  skill = Fk.skills["archery_attack_skill"],
  is_damage_card = true,
  multiple_targets = true,
}

extension:addCardSpec("lvs__archery_attack", Card.Heart, 1)

local god_salvation = fk.CreateCard{
  name = "lvs__god_salvation",
  type = Card.TypeTrick,
  skill = Fk.skills["god_salvation_skill"],
  multiple_targets = true,
}
extension:addCardSpec("lvs__god_salvation", Card.Heart, 1)
Fk:loadTranslationTable{
  ["lvs__savage_assault"] = "南蛮入侵",
  [":lvs__savage_assault"] = Fk:translate(":savage_assault"),
  ["lvs__archery_attack"] = "万箭齐发",
  [":lvs__archery_attack"] = Fk:translate(":archery_attack"),
  ["lvs__god_salvation"] = "桃园结义",
  [":lvs__god_salvation"] = Fk:translate(":god_salvation"),
}


local await_exhausted = fk.CreateCard{
  name = "lvshi__await_exhausted",
  type = Card.TypeTrick,
  skill = "lvshi__await_exhausted_skill",
  multiple_targets = true,
}
extension:addCardSpec("lvshi__await_exhausted", Card.Club, 11)
Fk:loadTranslationTable{
  ["lvshi__await_exhausted"] = "以逸待劳",
  ["await_exhausted"] = "以逸待劳",
  ["lvshi__await_exhausted_skill"] = "以逸待劳",
  [":lvshi__await_exhausted"] = "锦囊牌<br/><b>时机</b>：出牌阶段<br/><b>目标</b>：你和与你阵营相同的角色<br/><b>效果</b>：每名目标角色各摸两张牌，"..
  "然后弃置两张牌。",
  ["#lvshi__await_exhausted"] = "你和与你阵营相同的角色各摸两张牌，然后弃置两张牌",
}


local lightning = fk.CreateCard{
  name = "lvshi__lightning",
  type = Card.TypeTrick,
  sub_type = Card.SubtypeDelayedTrick,
  skill = "lvshi__lightning_skill",
}

local indulgence = fk.CreateCard{
  name = "lvshi__indulgence",
  type = Card.TypeTrick,
  sub_type = Card.SubtypeDelayedTrick,
  skill = Fk.skills["indulgence_skill"],
  --skill = "lvshi__indulgence_skill",
}

local supply_shortage = fk.CreateCard{
  name = "lvshi__supply_shortage",
  type = Card.TypeTrick,
  sub_type = Card.SubtypeDelayedTrick,
  skill = "lvshi__supply_shortage_skill",
}

extension:addCardSpec("lvshi__indulgence", Card.Heart, 6)
extension:addCardSpec("lvshi__supply_shortage", Card.Club, 6)
extension:addCardSpec("lvshi__lightning", Card.Spade, 12)

Fk:loadTranslationTable{
  ["lvshi__indulgence"] = "乐不思蜀",
  [":lvshi__indulgence"] = Fk:translate(":indulgence"),
  ["lvshi__supply_shortage"] = "兵粮寸断",
  [":lvshi__supply_shortage"] = "<b>延时锦囊牌</b><br /><b>时机</b>：出牌阶段<br /><b>目标</b>：一名其他角色。<br /><b>效果</b>：将此牌置于目标角色判定区内。其判定阶段进行判定：若结果不为♣，其跳过摸牌阶段。",
  ["#lvshi__supply_shortage_skill"] = "选择一名角色，将此牌置于其判定区内。其判定阶段判定：<br />若结果不为♣，其跳过摸牌阶段",

  ["lvshi__lightning"] = "闪电",
  [":lvshi__lightning"] = "<b>延时锦囊牌</b><br /><b>时机</b>：出牌阶段<br /><b>目标</b>：一名角色。<br /><b>效果</b>：目标角色判定，若结果为黑桃2-9，则其受到3点无来源雷电伤害，将此牌置入弃牌堆。否则将此牌置入其下家的判定区（若其下家不为此牌的合法目标，则顺延至其下家的下家，以此类推）。",
  ["#lvshi__lightning_skill"] = "选择一名角色，将【闪电】置入其判定区",
}

local crossbow = fk.CreateCard{
  name = "lvshi__crossbow",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeWeapon,
  attack_range = 2,
  equip_skill = "#lvshi__crossbow_skill",
}

extension:addCardSpec("lvshi__crossbow", Card.Diamond, 1)

Fk:loadTranslationTable{
  ["lvshi__crossbow"] = "连弩",
  [":lvshi__crossbow"] = "装备牌·武器<br /><b>攻击范围</b>：2 <br/><b>武器技能</b>：锁定技，你使用【杀】的次数上限+3。",
  ["#lvshi__crossbow_skill"] = "连弩",
}

local guding_blade = fk.CreateCard{
  name = "lvshi__guding_blade",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeWeapon,
  attack_range = 2,
  equip_skill = "#lvshi__guding_blade_skill",
}

extension:addCardSpec("lvshi__guding_blade", Card.Spade, 1)

Fk:loadTranslationTable{
  ["lvshi__guding_blade"] = "古锭刀",
  [":lvshi__guding_blade"] =  "装备牌·武器<br /><b>攻击范围</b>：2<br /><b>武器技能</b>：当你使用【杀】对目标角色造成伤害时，若其没有手牌或体力值为唯一最小，此伤害+1。",
  ["#lvshi__guding_blade_skill"] = "古锭刀",
}

local yitian_sword = fk.CreateCard{
  name = "lvshi__yitian_sword",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeWeapon,
  attack_range = 2,
  equip_skill = "#lvshi__yitian_sword_skill",
}

extension:addCardSpec("lvshi__yitian_sword", Card.Spade, 2)

Fk:loadTranslationTable{
  ["yitian_sword"] = "倚天剑",
  ["lvshi__yitian_sword"] = "倚天剑",
  [":lvshi__yitian_sword"] = "装备牌·武器<br /><b>攻击范围</b>：2<br /><b>武器技能</b>：你可将属性【杀】当光【杀】使用，当你造成光属性伤害后，你可弃置一张手牌，回复1点体力。",
  ["#lvshi__yitian_sword_skill"] = "倚天剑",
}

local double_swords = fk.CreateCard{
  name = "lvshi__double_swords",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeWeapon,
  attack_range = 2,
  equip_skill = "#lvshi__double_swords_skill",
}

extension:addCardSpec("lvshi__double_swords", Card.Spade, 8)

Fk:loadTranslationTable{
  ["lvshi__double_swords"] = "鸾凤和鸣剑",
  ["#lvshi__double_swords_skill"] = "鸾凤和鸣剑",
  [":lvshi__double_swords"] = "装备牌·武器<br /><b>攻击范围</b>：2<br /><b>武器技能</b>：当你使用火【杀】或雷【杀】指定目标后，你可令目标角色弃置一张牌，否则你摸一张牌。",
  ["#ls__double_swords-invoke"] = "请弃置一张牌，否则%src摸一张牌",
}

local spear = fk.CreateCard{
  name = "lvshi__spear",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeWeapon,
  attack_range = 3,
  equip_skill = "lvshi__spear_skill&",
}

extension:addCardSpec("lvshi__spear", Card.Club, 5)

Fk:loadTranslationTable{
  ["lvshi__spear"] = "丈八蛇矛",
  [":lvshi__spear"] = "装备牌·武器<br /><b>攻击范围</b>：3<br /><b>武器技能</b>：你可将两张手牌当【杀】使用或打出，以此法转化的牌每有一张【杀】，则额外需要一张【闪】抵消。",
  ["lvshi__spear_skill&"] = "丈八蛇矛",
  [":lvshi__spear_skill&"] = "你可将两张手牌当【杀】使用或打出，以此法转化的牌每有一张【杀】，则额外需要一张【闪】抵消。",
  ["#lvshi__spear_skill&"] = "你可将两张手牌当【杀】使用或打出",
}

local halberd = fk.CreateCard{
  name = "lvshi__halberd",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeWeapon,
  attack_range = 4,
  equip_skill = "#lvshi__halberd_skill",
}
extension:addCardSpec("lvshi__halberd", Card.Diamond, 5)

Fk:loadTranslationTable{
  ["lvshi__halberd"] = "方天画戟",
  [":lvshi__halberd"] = "装备牌·武器<br /><b>攻击范围</b>：4<br /><b>武器技能</b>：当你使用【杀】选择目标后，"..
  "可以令至多两名其他角色也成为目标，当此【杀】被【闪】抵消后，此【杀】对所有目标均无效。",
  ["#lvshi__halberd_skill"] = "方天画戟",
  ["#lvshi__halberd_targets"] = "方天画戟",
  ["#lvshi__halberd-ask"] = "你可发动〖方天画戟〗，令至多两名角色也成为目标",
  ["#lvshi__halberd_delay"] = "方天画戟",
  ["#HalberdTargets"] = "%from 发动了〖%arg〗，令 %to 也成为 %card 的目标",
  ["#HalberdNullified"] = "由于〖%arg〗的效果，%from 对所有剩余目标使用的 %arg2 无效",
}

local fan = fk.CreateCard{
  name = "lvshi__fan",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeWeapon,
  attack_range = 4,
  equip_skill = "#lvshi__fan_skill",
}
extension:addCardSpec("lvshi__fan", Card.Diamond, 12)
Fk:loadTranslationTable{
  ["lvshi__fan"] = "朱雀羽扇",
  ["#lvshi__fan_skill"] = "朱雀羽扇",
  [":lvshi__fan"] = "装备牌·武器<br /><b>攻击范围</b>：4<br /><b>武器技能</b>：当你使用普通【杀】时，可将之视为火【杀】，你使用非转化/视为的火【杀】造成伤害时，令之+1。",
  ["#fans-invoke"] = "你可将此【杀】视为火【杀】",
}

local nioh_shield = fk.CreateCard{
  name = "lvshi__nioh_shield",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeArmor,
  equip_skill = Fk.skills["#nioh_shield_skill"],
}
extension:addCardSpec("lvshi__nioh_shield", Card.Club, 2)
Fk:loadTranslationTable{
  ["lvshi__nioh_shield"] = "仁王盾",
  ["#lvshi__nioh_shield_skill"] = "仁王盾",
  [":lvshi__nioh_shield"] = Fk:translate(":nioh_shield"),
}

local vine = fk.CreateCard{
  name = "lvshi__vine",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeArmor,
  equip_skill = "#lvshi__vine_skill",
}

extension:addCardSpec("lvshi__vine", Card.Spade, 5)

Fk:loadTranslationTable{
  ["lvshi__vine"] = "藤甲",
  ["#lvshi__vine_skill"] = "藤甲",
  [":lvshi__vine"] = "装备牌·防具<br /><b>防具技能</b>：锁定技。【南蛮入侵】、【万箭齐发】、【水淹七军】和普通【杀】对你无效。当你受到火焰伤害后，你弃置装备区内的【藤甲】并失去1点体力。",
}

local silver_lion = fk.CreateCard{
  name = "lvshi__silver_lion",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeArmor,
  equip_skill = "#lvshi__silver_lion_skill",
}
extension:addCardSpec("lvshi__silver_lion", Card.Club, 2)

Fk:loadTranslationTable{
  ["lvshi__silver_lion"] = "白银狮子",
  [":lvshi__silver_lion"] = Fk:translate(":silver_lion"),
  ["#lvshi__silver_lion_skill"] = "白银狮子",
}

local brightArmor = fk.CreateCard{
  name = "lvshi__bright_armor",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeArmor,
  equip_skill = "#lvshi__bright_armor_skill",
}
extension:addCardSpec("lvshi__bright_armor", Card.Spade, 2)
Fk:loadTranslationTable{
  ["bright_armor"] = "明光铠",
  ["lvshi__bright_armor"] = "明光铠",
  ["#lvshi__bright_armor_skill"] = "明光铠",
  [":lvshi__bright_armor"] = "装备牌·防具<br/><b>防具技能</b>：锁定技，当你横置前，你防止之；当你成为【火攻】，【落井下石】，【出其不意】或属性【杀】的目标时，你取消此目标（若为光【杀】，则使用者代替你为目标）。",
}

local wonder_map = fk.CreateCard{
  name = "lvshi__wonder_map",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeTreasure,
  equip_skill = "#lvshi__wonder_map_skill",
}

extension:addCardSpec("lvshi__wonder_map", Card.Heart, 8)

Fk:loadTranslationTable{
  ["wonder_map"] = "天机图",
  ["lvshi__wonder_map"] = "天机图",
  [":lvshi__wonder_map"] = "装备牌·宝物<br /><b>宝物技能</b>：锁定技，你视为智勇策略角色；当你失去装备区内的【天机图】后，你将手牌补至四张。",
  ["#lvshi__wonder_map_skill"] = "天机图",
}

local poster = fk.CreateCard{
  name = "lvs__poster",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeOffensiveRide,
  equip_skill = "#lvs__poster_skill",
}
extension:addCardSpec("lvs__poster", Card.Spade, 6)
Fk:loadTranslationTable{
  ["poster"] = "驿马",
  ["lvs__poster"] = "驿马",
  ["#lvs__poster_skill"] = "驿马",
  [":lvs__poster"] = "装备牌·进攻类坐骑<br /><b>坐骑技能</b>：锁定技，你与其他角色的距离-1，若你的装备区内牌数量不大于2，则额外-1。",
}

local chitu = fk.CreateCard{
  name = "lvs__chitu",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeOffensiveRide,
  equip_skill = "#lvs__chitu_skill",
}
extension:addCardSpec("lvs__chitu", Card.Heart, 5)
Fk:loadTranslationTable{
  ["lvs__chitu"] = "赤兔",
  ["#lvs__chitu_skill"] = "赤兔",
  [":lvs__chitu"] = "装备牌·进攻类坐骑<br /><b>坐骑技能</b>：锁定技，你与其他角色的距离-1；若你为勇策略，你使用红色【杀】不可被响应。",
}

local whitehorse = fk.CreateCard{
  name = "lvs__whitehorse",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeDefensiveRide,
  equip_skill = "#lvs__whitehorse_skill",
}
extension:addCardSpec("lvs__whitehorse", Card.Club, 1)
Fk:loadTranslationTable{
  ["whitehorse"] = "白马",
  ["lvs__whitehorse"] = "白马",
  ["#lvs__whitehorse_skill"] = "白马",
  [":lvs__whitehorse"] = "装备牌·防御类坐骑<br /><b>坐骑技能</b>：锁定技，其他角色与你的距离+1，若你的体力值大于2，你与其他角色的距离-1。",
}

local war_elephant = fk.CreateCard{
  name = "lvs__war_elephant",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeDefensiveRide,
  equip_skill = "#lvs__war_elephant_skill",
}
extension:addCardSpec("lvs__war_elephant", Card.Spade, 11)
Fk:loadTranslationTable{
  ["war_elephant"] = "战象",
  ["lvs__war_elephant"] = "战象",
  ["#lvs__war_elephant_skill"] = "战象",
  [":lvs__war_elephant"] = "装备牌·防御类坐骑<br /><b>坐骑技能</b>：锁定技，其他角色与你的距离+2。"..
  "<br />此牌置入你的装备区后，你弃置装备区内的进攻坐骑牌；当进攻坐骑牌置入你的装备区后，你弃置装备区内的此牌。",
}

local camel = fk.CreateCard{
  name = "lvs__camel",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeDefensiveRide,
  equip_skill = "#lvs__camel_skill",
}

extension:addCardSpec("lvs__camel", Card.Heart, 12)

Fk:loadTranslationTable{
  ["camel"] = "骆驼",
  ["lvs__camel"] = "骆驼",
  ["#lvs__camel_skill"] = "骆驼",
  [":lvs__camel"] = "装备牌·防御类坐骑<br /><b>坐骑技能</b>：锁定技，其他角色与你的距离+1；若你有智策略，你的手牌上限+1。",
}

local secret_advance = fk.CreateCard{
  name = "lvshi__secret_advance",
  type = Card.TypeTrick,
  skill = "lvshi__secret_advance_skill",
}
extension:addCardSpec("lvshi__secret_advance", Card.Spade, 6)

Fk:loadTranslationTable{
  ["secret_advance"] = "暗度陈仓",
  ["lvshi__secret_advance"] = "暗度陈仓",
  ["lvshi__secret_advance_skill"] = "暗度陈仓",
  ["#lvshi__secret_advance_skill"] = "你获得目标角色区域内一至两张牌",
  [":lvshi__secret_advance"] = "<b>锦囊牌</b><br /><b>时机</b>：出牌阶段<br /><b>目标</b>：一名区域内有牌的其他角色<br /><b>效果</b>：你获得目标角色区域内一至两张牌，然后交给其等量的牌。"..
  "<br /><b>智策略效果</b>：获得牌的上限改为四张。<br /><b>勇策略效果</b>：你此回合对目标角色使用牌无距离限制。",
  ["secret_advance_scheme"] = "智策略",
  [":secret_advance_scheme"] = "获得牌的上限改为四张",
  ["secret_advance_courage"] = "勇策略",
  [":secret_advance_courage"] = "你此回合对目标角色使用牌无距离限制",
}

local blade = fk.CreateCard{
  name = "lvshi__blade",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeWeapon,
  attack_range = 3,
  equip_skill = "#lvshi__blade_skill",
}
extension:addCardSpec("lvshi__blade", Card.Heart, 5)
Fk:loadTranslationTable{
  ["lvshi__blade"] = "偃月刀",
  ["#lvshi__blade_skill"] = "偃月刀",
  [":lvshi__blade"] = "装备牌·武器<br /><b>攻击范围</b>：3<br /><b>武器技能</b>：当你使用【杀】指定目标后，你可明置目标角色一张手牌，然后弃置其一张和此【杀】颜色相同的明置手牌。",
}

local wooden_ox = fk.CreateCard{
  name = "lvshi__wooden_ox",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeTreasure,
  equip_skill = "lvshi__wooden_ox_skill&",

  on_uninstall = function(self, room, player)
    Treasure.onUninstall(self, room, player)
    player:setSkillUseHistory(self.equip_skill.name, 0, Player.HistoryPhase)
  end,
}

extension:addCardSpec("lvshi__wooden_ox", Card.Club, 2)

Fk:loadTranslationTable{
  ["lvshi__wooden_ox"] = "木牛流马",
  [":lvshi__wooden_ox"] = "装备牌·宝物<br/><b>宝物技能</b>：<br/>" ..
  "阶段技，你可将一张手牌扣置于装备区里的【木牛流马】下（称为“辎”，“辎”至多有5张），然后你可以将【木牛流马】置入一名"..
  "其他角色的装备区。你可以如手牌般使用或打出“辎”。",
  ["wooden_ox"] = "木牛流马",
  ["lvshi__wooden_ox_skill&"] = "木牛",
  [":lvshi__wooden_ox_skill&"] = "出牌阶段限一次，你可将一张手牌扣置于装备区里的【木牛流马】下（称为“辎”，“辎”至多有5张），"..
  "然后你可以将【木牛流马】置入一名其他角色的装备区。你可以如手牌般使用或打出“辎”。",
  ["#wooden_ox-move"] = "你可以将【木牛流马】移动至一名其他角色的装备区",
  ["$ls_carriage"] = "辎",
  ["#wooden_ox-prompt"] = "你可以将一张手牌扣置于【木牛流马】下",
}

local unexpectation = fk.CreateCard{
  name = "lvshi__unexpectation",
  type = Card.TypeTrick,
  skill = "lvshi__unexpectation_skill",
  is_damage_card = true,
}
extension:addCardSpec("lvshi__unexpectation", Card.Diamond, 1)
Fk:loadTranslationTable{
  ["unexpectation"] = "出其不意",
  ["lvshi__unexpectation"] = "出其不意",
  ["lvshi__unexpectation_skill"] = "出其不意",
  ["#lvshi__unexpectation_skill"] = "你选择目标角色的一张手牌，花色与此牌不同则对其造成1点伤害",
  [":lvshi__unexpectation"] = "锦囊牌<br/><b>时机</b>：出牌阶段<br/><b>目标</b>：一名有手牌的其他角色<br/><b>效果</b>：你选择目标角色的一张手牌，令其展示此牌，"..
  "若与此【出其不意】花色不同，你对其造成1点伤害。"..
  "<br /><b>智策略效果</b>：目标角色改为展示所有手牌。<br /><b>勇策略效果</b>：若花色相同，目标角色弃置展示的牌。",

  ["unexpectation_scheme"] = "智策略",
  [":unexpectation_scheme"] = "目标角色改为展示所有手牌",
  ["unexpectation_courage"] = "勇策略",
  [":unexpectation_courage"] = "若花色相同，目标角色弃置展示的牌",
}

extension:loadCardSkels {
  slash,
  thunder__slash,
  fire__slash,
  bright__slash,
  jink,
  peach,
  analeptic,
  pear,
  poison,
  scroll,

  dismantlement,
  snatch,
  duel,
  fireattack,
  drowning,
  ex_nihilo,
  rockfall,
  support,
  nullification,
  iron_chain,
  lure_tiger,
  collaborate,
  savage_assault,
  archery_attack,
  god_salvation,
  await_exhausted,

  indulgence,
  supply_shortage,
  lightning,

  crossbow,
  guding_blade,
  yitian_sword,
  double_swords,
  blade,
  spear,
  halberd,
  fan,

  nioh_shield,
  silver_lion,
  vine,
  brightArmor,

  poster,
  chitu,
  whitehorse,
  war_elephant,
  camel,

  wonder_map,

  secret_advance,
  blade,
  wooden_ox,
  unexpectation,
}

return extension